import { createStore } from "vuex";
import getters from './getters'
import category from './modules/category'
import search from './modules/search'
import createPersistedstate from 'vuex-persistedstate'
const store = createStore({
    getters,
    modules: {
        category, search
    },
    plugins: [
        createPersistedstate({
            //保存在localStorage中的可以
            key: 'x-front',
            // 存储的指定模块
            paths: ['category']

        })
    ]
})
export default store